package com.iotteam.androidbase.moudules.login.view;

import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

import com.iotteam.androidbase.R;
import com.iotteam.androidbase.base.ToolbarActivity;
import com.iotteam.androidbase.commen.LocalInfoManager;

/**
 * Created by lidechen on 5/26/17.
 */

public class UserInfoActivity  extends ToolbarActivity implements IUserInfoView{

    private Button mLogoutBtn;

    @Override
    protected int provideContentViewId() {
        return R.layout.activity_userinfo;
    }

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        mLogoutBtn = (Button) findViewById(R.id.btn_logout);
        mLogoutBtn.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                LocalInfoManager.getInstance().saveUserInfo(null);
                finish();
            }
        });
    }

    public static void launch(Context context) {
        context.startActivity(new Intent(context, UserInfoActivity.class));
    }
}
